import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/double_control/get_security_risk_grading_control_list_app_entity.dart';

GetSecurityRiskGradingControlListAppEntity $GetSecurityRiskGradingControlListAppEntityFromJson(Map<String, dynamic> json) {
  final GetSecurityRiskGradingControlListAppEntity getSecurityRiskGradingControlListAppEntity = GetSecurityRiskGradingControlListAppEntity();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    getSecurityRiskGradingControlListAppEntity.id = id;
  }
  final dynamic riskMeasureName = json['riskMeasureName'];
  if (riskMeasureName != null) {
    getSecurityRiskGradingControlListAppEntity.riskMeasureName = riskMeasureName;
  }
  final String? riskEventId = jsonConvert.convert<String>(json['riskEventId']);
  if (riskEventId != null) {
    getSecurityRiskGradingControlListAppEntity.riskEventId = riskEventId;
  }
  final String? riskEventName = jsonConvert.convert<String>(json['riskEventName']);
  if (riskEventName != null) {
    getSecurityRiskGradingControlListAppEntity.riskEventName = riskEventName;
  }
  final String? riskObjectId = jsonConvert.convert<String>(json['riskObjectId']);
  if (riskObjectId != null) {
    getSecurityRiskGradingControlListAppEntity.riskObjectId = riskObjectId;
  }
  final String? riskObjectName = jsonConvert.convert<String>(json['riskObjectName']);
  if (riskObjectName != null) {
    getSecurityRiskGradingControlListAppEntity.riskObjectName = riskObjectName;
  }
  final String? riskUnitId = jsonConvert.convert<String>(json['riskUnitId']);
  if (riskUnitId != null) {
    getSecurityRiskGradingControlListAppEntity.riskUnitId = riskUnitId;
  }
  final String? riskUnitName = jsonConvert.convert<String>(json['riskUnitName']);
  if (riskUnitName != null) {
    getSecurityRiskGradingControlListAppEntity.riskUnitName = riskUnitName;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    getSecurityRiskGradingControlListAppEntity.companyCode = companyCode;
  }
  final dynamic associationMeasureId = json['associationMeasureId'];
  if (associationMeasureId != null) {
    getSecurityRiskGradingControlListAppEntity.associationMeasureId = associationMeasureId;
  }
  final String? dataSrc = jsonConvert.convert<String>(json['dataSrc']);
  if (dataSrc != null) {
    getSecurityRiskGradingControlListAppEntity.dataSrc = dataSrc;
  }
  final String? dataSrcLabel = jsonConvert.convert<String>(json['dataSrcLabel']);
  if (dataSrcLabel != null) {
    getSecurityRiskGradingControlListAppEntity.dataSrcLabel = dataSrcLabel;
  }
  final String? riskMeasureDesc = jsonConvert.convert<String>(json['riskMeasureDesc']);
  if (riskMeasureDesc != null) {
    getSecurityRiskGradingControlListAppEntity.riskMeasureDesc = riskMeasureDesc;
  }
  final String? troubleshootContent = jsonConvert.convert<String>(json['troubleshootContent']);
  if (troubleshootContent != null) {
    getSecurityRiskGradingControlListAppEntity.troubleshootContent = troubleshootContent;
  }
  final int? consequenceReduction = jsonConvert.convert<int>(json['consequenceReduction']);
  if (consequenceReduction != null) {
    getSecurityRiskGradingControlListAppEntity.consequenceReduction = consequenceReduction;
  }
  final int? probabilityReduction = jsonConvert.convert<int>(json['probabilityReduction']);
  if (probabilityReduction != null) {
    getSecurityRiskGradingControlListAppEntity.probabilityReduction = probabilityReduction;
  }
  final String? classify1 = jsonConvert.convert<String>(json['classify1']);
  if (classify1 != null) {
    getSecurityRiskGradingControlListAppEntity.classify1 = classify1;
  }
  final dynamic classify1Label = json['classify1Label'];
  if (classify1Label != null) {
    getSecurityRiskGradingControlListAppEntity.classify1Label = classify1Label;
  }
  final String? classify2 = jsonConvert.convert<String>(json['classify2']);
  if (classify2 != null) {
    getSecurityRiskGradingControlListAppEntity.classify2 = classify2;
  }
  final dynamic classify2Label = json['classify2Label'];
  if (classify2Label != null) {
    getSecurityRiskGradingControlListAppEntity.classify2Label = classify2Label;
  }
  final String? classify3 = jsonConvert.convert<String>(json['classify3']);
  if (classify3 != null) {
    getSecurityRiskGradingControlListAppEntity.classify3 = classify3;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    getSecurityRiskGradingControlListAppEntity.deleted = deleted;
  }
  final String? dataSrcControlLabel = jsonConvert.convert<String>(json['dataSrcControlLabel']);
  if (dataSrcControlLabel != null) {
    getSecurityRiskGradingControlListAppEntity.dataSrcControlLabel = dataSrcControlLabel;
  }
  final String? workType = jsonConvert.convert<String>(json['workType']);
  if (workType != null) {
    getSecurityRiskGradingControlListAppEntity.workType = workType;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    getSecurityRiskGradingControlListAppEntity.createDate = createDate;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    getSecurityRiskGradingControlListAppEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    getSecurityRiskGradingControlListAppEntity.createById = createById;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    getSecurityRiskGradingControlListAppEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    getSecurityRiskGradingControlListAppEntity.updateDate = updateDate;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    getSecurityRiskGradingControlListAppEntity.updateBy = updateBy;
  }
  final String? hazardCode = jsonConvert.convert<String>(json['hazardCode']);
  if (hazardCode != null) {
    getSecurityRiskGradingControlListAppEntity.hazardCode = hazardCode;
  }
  final int? status = jsonConvert.convert<int>(json['status']);
  if (status != null) {
    getSecurityRiskGradingControlListAppEntity.status = status;
  }
  final String? warehouseId = jsonConvert.convert<String>(json['warehouseId']);
  if (warehouseId != null) {
    getSecurityRiskGradingControlListAppEntity.warehouseId = warehouseId;
  }
  final int? isUpload = jsonConvert.convert<int>(json['isUpload']);
  if (isUpload != null) {
    getSecurityRiskGradingControlListAppEntity.isUpload = isUpload;
  }
  final String? riskMeasureLevel = jsonConvert.convert<String>(json['riskMeasureLevel']);
  if (riskMeasureLevel != null) {
    getSecurityRiskGradingControlListAppEntity.riskMeasureLevel = riskMeasureLevel;
  }
  final dynamic riskMeasureLevelLabel = json['riskMeasureLevelLabel'];
  if (riskMeasureLevelLabel != null) {
    getSecurityRiskGradingControlListAppEntity.riskMeasureLevelLabel = riskMeasureLevelLabel;
  }
  final dynamic taskNum = json['taskNum'];
  if (taskNum != null) {
    getSecurityRiskGradingControlListAppEntity.taskNum = taskNum;
  }
  final String? hazardLiablePerson = jsonConvert.convert<String>(json['hazardLiablePerson']);
  if (hazardLiablePerson != null) {
    getSecurityRiskGradingControlListAppEntity.hazardLiablePerson = hazardLiablePerson;
  }
  final String? hazardDep = jsonConvert.convert<String>(json['hazardDep']);
  if (hazardDep != null) {
    getSecurityRiskGradingControlListAppEntity.hazardDep = hazardDep;
  }
  final String? practicableStatus = jsonConvert.convert<String>(json['practicableStatus']);
  if (practicableStatus != null) {
    getSecurityRiskGradingControlListAppEntity.practicableStatus = practicableStatus;
  }
  final dynamic taskList = json['taskList'];
  if (taskList != null) {
    getSecurityRiskGradingControlListAppEntity.taskList = taskList;
  }
  return getSecurityRiskGradingControlListAppEntity;
}

Map<String, dynamic> $GetSecurityRiskGradingControlListAppEntityToJson(GetSecurityRiskGradingControlListAppEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['riskMeasureName'] = entity.riskMeasureName;
  data['riskEventId'] = entity.riskEventId;
  data['riskEventName'] = entity.riskEventName;
  data['riskObjectId'] = entity.riskObjectId;
  data['riskObjectName'] = entity.riskObjectName;
  data['riskUnitId'] = entity.riskUnitId;
  data['riskUnitName'] = entity.riskUnitName;
  data['companyCode'] = entity.companyCode;
  data['associationMeasureId'] = entity.associationMeasureId;
  data['dataSrc'] = entity.dataSrc;
  data['dataSrcLabel'] = entity.dataSrcLabel;
  data['riskMeasureDesc'] = entity.riskMeasureDesc;
  data['troubleshootContent'] = entity.troubleshootContent;
  data['consequenceReduction'] = entity.consequenceReduction;
  data['probabilityReduction'] = entity.probabilityReduction;
  data['classify1'] = entity.classify1;
  data['classify1Label'] = entity.classify1Label;
  data['classify2'] = entity.classify2;
  data['classify2Label'] = entity.classify2Label;
  data['classify3'] = entity.classify3;
  data['deleted'] = entity.deleted;
  data['dataSrcControlLabel'] = entity.dataSrcControlLabel;
  data['workType'] = entity.workType;
  data['createDate'] = entity.createDate;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  data['updateBy'] = entity.updateBy;
  data['hazardCode'] = entity.hazardCode;
  data['status'] = entity.status;
  data['warehouseId'] = entity.warehouseId;
  data['isUpload'] = entity.isUpload;
  data['riskMeasureLevel'] = entity.riskMeasureLevel;
  data['riskMeasureLevelLabel'] = entity.riskMeasureLevelLabel;
  data['taskNum'] = entity.taskNum;
  data['hazardLiablePerson'] = entity.hazardLiablePerson;
  data['hazardDep'] = entity.hazardDep;
  data['practicableStatus'] = entity.practicableStatus;
  data['taskList'] = entity.taskList;
  return data;
}

extension GetSecurityRiskGradingControlListAppEntityExtension on GetSecurityRiskGradingControlListAppEntity {
  GetSecurityRiskGradingControlListAppEntity copyWith({
    String? id,
    dynamic riskMeasureName,
    String? riskEventId,
    String? riskEventName,
    String? riskObjectId,
    String? riskObjectName,
    String? riskUnitId,
    String? riskUnitName,
    String? companyCode,
    dynamic associationMeasureId,
    String? dataSrc,
    String? dataSrcLabel,
    String? riskMeasureDesc,
    String? troubleshootContent,
    int? consequenceReduction,
    int? probabilityReduction,
    String? classify1,
    dynamic classify1Label,
    String? classify2,
    dynamic classify2Label,
    String? classify3,
    String? deleted,
    String? dataSrcControlLabel,
    String? workType,
    String? createDate,
    String? createBy,
    String? createById,
    String? updateById,
    String? updateDate,
    String? updateBy,
    String? hazardCode,
    int? status,
    String? warehouseId,
    int? isUpload,
    String? riskMeasureLevel,
    dynamic riskMeasureLevelLabel,
    dynamic taskNum,
    String? hazardLiablePerson,
    String? hazardDep,
    String? practicableStatus,
    dynamic taskList,
  }) {
    return GetSecurityRiskGradingControlListAppEntity()
      ..id = id ?? this.id
      ..riskMeasureName = riskMeasureName ?? this.riskMeasureName
      ..riskEventId = riskEventId ?? this.riskEventId
      ..riskEventName = riskEventName ?? this.riskEventName
      ..riskObjectId = riskObjectId ?? this.riskObjectId
      ..riskObjectName = riskObjectName ?? this.riskObjectName
      ..riskUnitId = riskUnitId ?? this.riskUnitId
      ..riskUnitName = riskUnitName ?? this.riskUnitName
      ..companyCode = companyCode ?? this.companyCode
      ..associationMeasureId = associationMeasureId ?? this.associationMeasureId
      ..dataSrc = dataSrc ?? this.dataSrc
      ..dataSrcLabel = dataSrcLabel ?? this.dataSrcLabel
      ..riskMeasureDesc = riskMeasureDesc ?? this.riskMeasureDesc
      ..troubleshootContent = troubleshootContent ?? this.troubleshootContent
      ..consequenceReduction = consequenceReduction ?? this.consequenceReduction
      ..probabilityReduction = probabilityReduction ?? this.probabilityReduction
      ..classify1 = classify1 ?? this.classify1
      ..classify1Label = classify1Label ?? this.classify1Label
      ..classify2 = classify2 ?? this.classify2
      ..classify2Label = classify2Label ?? this.classify2Label
      ..classify3 = classify3 ?? this.classify3
      ..deleted = deleted ?? this.deleted
      ..dataSrcControlLabel = dataSrcControlLabel ?? this.dataSrcControlLabel
      ..workType = workType ?? this.workType
      ..createDate = createDate ?? this.createDate
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate
      ..updateBy = updateBy ?? this.updateBy
      ..hazardCode = hazardCode ?? this.hazardCode
      ..status = status ?? this.status
      ..warehouseId = warehouseId ?? this.warehouseId
      ..isUpload = isUpload ?? this.isUpload
      ..riskMeasureLevel = riskMeasureLevel ?? this.riskMeasureLevel
      ..riskMeasureLevelLabel = riskMeasureLevelLabel ?? this.riskMeasureLevelLabel
      ..taskNum = taskNum ?? this.taskNum
      ..hazardLiablePerson = hazardLiablePerson ?? this.hazardLiablePerson
      ..hazardDep = hazardDep ?? this.hazardDep
      ..practicableStatus = practicableStatus ?? this.practicableStatus
      ..taskList = taskList ?? this.taskList;
  }
}
